package speed2010.andreza.vspeed.util;

import java.util.Arrays;

/**
 * @author <a href="mailto:andreza.lba@gmail.com">Andreza Leite de Alencar</a>
 */
public final class DebugUtils {

	private DebugUtils() {
	}

	private static boolean DEBUG_MODE = false;

	public static void start() {
		DEBUG_MODE = true;
	}

	public static void stop() {
		DEBUG_MODE = false;
	}

	public static void debug(final String pText) {
		if (DEBUG_MODE) {
			System.out.println(pText);
		}
	}

	public static void debug(final Class<?> pClass, final String pMethod, final Object... pParams) {
		if (DEBUG_MODE) {
			debug(String.format("%s.%s(%s)", pClass.getSimpleName(), pMethod, Arrays.toString(pParams)));
		}
	}

}
